<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>添加角色</title>
  <link href="__PUBLIC__/css/admin/reset.css" rel="stylesheet" type="text/css">
  <link href="__PUBLIC__/css/admin/zh-cn-system.css" rel="stylesheet" type="text/css">
  <link href="__PUBLIC__/css/admin/table_form.css" rel="stylesheet" type="text/css">
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/admin/style/zh-cn-styles1.css" title="styles1" media="screen">
  <link rel="alternate stylesheet" type="text/css" href="__PUBLIC__/css/admin/style/zh-cn-styles2.css" title="styles2" media="screen">
  <link rel="alternate stylesheet" type="text/css" href="__PUBLIC__/css/admin/style/zh-cn-styles3.css" title="styles3" media="screen">
  <link rel="alternate stylesheet" type="text/css" href="__PUBLIC__/css/admin/style/zh-cn-styles4.css" title="styles4" media="screen">
  <script type="text/javascript" src="__PUBLIC__/js/admin/jquery.min.js"></script>
  <script type="text/javascript" src="__PUBLIC__/js/admin/jquery.cookie.js"></script>
  <script type="text/javascript" src="__PUBLIC__/js/admin/styleswitch.js"></script>
  <script type="text/javascript" src="__PUBLIC__/js/admin/admin_common.js"></script>
  <script src="__PUBLIC__/js/admin/jquery.artDialog.source.js?skin=default"></script>
  <script src="__PUBLIC__/js/admin/plugins/iframeTools.source.js"></script>
  <script language="javascript" type="text/javascript" src="__PUBLIC__/js/admin/formvalidator.js" charset="UTF-8"></script>
  <script language="javascript" type="text/javascript" src="__PUBLIC__/js/admin/formvalidatorregex.js" charset="UTF-8"></script>
</head>
<body width="100%">
  <div class="subnav">
    <div class="content-menu ib-a blue line-x">
      <a class="add fb" href="__MODULE__/Role/add"><em>添加角色</em></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="__MODULE__/Role/index"><em>角色管理</em></a><span>|</span><a class="" href="javascript:void(0);"><em>权限分配</em></a>
    </div>
  </div>
  <style type="text/css">
  html{_overflow-y:scroll}
  </style>
  <div class="pad-lr-10">
    <form name="myform" id="myform" action="__MODULE__/Role/edit" method="post">
      <input name="nid" type="hidden" value="<?php echo $nid; ?>" />
      <table cellpadding=0 cellspacing=0 class="table_form" width="100%">
        <tr>
          <td width="10%" >角色名称</td>
          <td width="90%"><input type="text" class="input-text" name="name" id="name" value="<?php echo $role['name']; ?>" size="40"/></td>
        </tr>
        <tr>
          <td width="10%" >描述</td>
          <td width="90%"><textarea name="remark" rows="4" cols="40"  id="remark" /><?php echo $role['remark']; ?></textarea>
          </td>
        </tr>
        <tr>
          <td width="10%" >状态</td>
          <td width="90%">
            <label style="float:left;width:75px">
              <input type="radio" class="input_radio " name="status" id="status_1" <?php if($role['status']==1){echo "checked";} ?> value="1"> 启用
            </label>
            <label style="float:left;width:75px">
              <input type="radio" class="input_radio " name="status" id="status_2" <?php if($role['status']==0){echo "checked";} ?>  value="0" > 禁用
            </label>
          </td>
        </tr>
      </table>
      <div class="bk15"></div>
      <div class="btn"> 
        <input type="submit" name="dosubmit" id="dosubmit" value="提交" class='button'>&nbsp;<input type="reset" value="重置" class='button'>
      </div>
    </form>
  </div>
  <script type="text/javascript">
  $(function(){
    $.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'200',height:'50'}, function(){this.close();$(obj).focus();})}});
    $("#name").formValidator({onshow:"请输入角色名称",onfocus:"请输入角色名称",oncorrect:"输入正确"}).inputValidator({min:1,onerror:"请输入角色名称"}).defaultPassed();
    // .ajaxValidator({type:"get",url:"__CONTROLLER__/public_check_poster",data:"",datatype:"html",cached:false,async:'true',success : function(data) {if( data == "1" ) { return true; } else { return false; } }, error: function(){alert("服务器没有返回数据，可能服务器忙，请重试");}, onerror : "该广告已存在", onwait : "正进行合法性校验..."});
  });
  </script>
</body>
</html>